﻿<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="fhdb" content="true">
    <title>个人中心</title>
    <link rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/css/bootstrap.min.css">
    <link rel="stylesheet" href="css/personalCenter1.css">
    <link rel="stylesheet" href="css/Navigation.css">
    <script type="text/javascript" src="js/jquery-1.10.2.min.js"></script>
    <script type="text/javascript" src="js/jquery.qrcode.min.js"></script>
</head>
<body>
    <div class="phoneError">
    </div>
    <div class="topTitle">
        个人中心
    </div>
    <div class="body_color">
        <div class="userName">
            <img src="images/touxiang.png" alt="">
            <div>
                <p id="TB_USERNAME">
                </p>
                <p id="TB_PHONE">
                </p>
            </div>
            <span class="glyphicon glyphicon-eye-close" id="eyeopen"></span>
            <span style="display:none" class="glyphicon glyphicon-eye-open" id="eyecloseopen"></span>
        </div>
        <!--保证金和佣金-->
        <div class="bzjAndYj">
            <div id="mybaozhengjin">
                <div class="by_title">我的保证金</div>
                <div class="by_price bzj_price"></div>
            </div>
            <div></div>
            <div id="myyongjin">
                <div class="by_title">当前佣金</div>
                <div class="by_price yj_price"></div>
            </div>
        </div>

        <!--排行榜-->
        <div class="phb">排行榜</div>
        <div class="tgbAndYjb">
            <div class="extension">
                <img src="images/tgb.png" />
                <div>推广榜</div>
            </div>
            <div class="commission">
                <img src="images/yjb.png" />
                <div>佣金榜</div>
            </div>
        </div>
        <!--应用-->
        <div class="yy_all">
            <div class="yy_title invitation">
                <img src="images/ewm.png" />
                <span>邀请分享</span>
                <span style="float:right;">></span>
            </div>
            <div class="yy_title zfbEmpower">
                <img src="images/zfsq.png" />
                <span>收款授权</span>
                <span style="float:right;">></span>
            </div>
            <div class="yy_title address">
                <img src="images/dzgl.png" />
                <span>我的地址</span>
                <span style="float:right;">></span>
            </div>
            <div class="yy_title authentication">
                <img src="images/smrz.png" />
                <span>身份验证</span>
                <span style="float:right;">></span>
            </div>
            <div class="yy_title helpCenter">
                <img src="images/ptyxy.png" />
                <span>平台协议</span>
                <span style="float:right;">></span>
            </div>
            <div class="yy_title changePassword">
                <img src="images/xgmm.png" />
                <span>修改密码</span>
                <span style="float:right;">></span>
            </div>
            <div class="passwordBox">
                <div class="signOut">
                    退出登录
                </div>
            </div>
        </div>
    </div>









    <!-- 遮罩层 -->
    <div class="cover">
    </div>
    <div class="bigInvitationBox">
        <p>
            邀请
        </p>
        <div id="qrcode">
        </div>
        <p>
            请截图进行保存
        </p>
        <div class="line">
        </div>
        <p class="confirm">
            确认
        </p>
    </div>
    <!-- 提现 -->
    <div class="covers">
    </div>
    <div class="bigWithdrawalBox">

        <div>
            <span>余额：￥</span> <span class="price"></span>
        </div>
        <div>
            <span>*提现金额：</span>
            <input type="text" placeholder="请输入提现金额" onkeyup="clearNoNum(this)" id="txprice">
        </div>
        <p>
            1、提现需满100元<br />
            2、提现扣除10%手续费<br />
            3、提现后3-5个工作日到账<br />
            4、请务必将支付授权信息填写正确
        </p>
        <div>
            <button class="cancel-withdrawal">
                取消
            </button>
            <button class="confirm-withdrawal">
                确认
            </button>
        </div>
    </div>
    <!-- 导航栏 -->
    <nav class="navbar navbar-default navbar-fixed-bottom">
        <div class="container">
            <div class="nav-item home">
                <span class="glyphicon glyphicon-home">
                    <span>
                        <div>首页</div>
            </div>
            <div class="nav-item order">
                <span class="glyphicon glyphicon-list">
                    <span>
                        <div>订单</div>
            </div>
            <div class="nav-item mine active">
                <span class="glyphicon glyphicon-user">
                    <span>
                        <div>我</div>
            </div>
        </div>
    </nav>
    <div class="space">
    </div>
</body>
<script>
    var number = "";
    var phone = "";
    $(function () {
        $(".signOut").click(function () {
            window.location.href = "../UserLogin/Login.html";
        })
        $.ajax({
            type: "post",
            url: "../../BaseRefWeb.aspx?stype=ISpMemberFun&method=GetIDCard&type=sp",
            success: function (result) {
                if (result != "") {
                    var data = JSON.parse(result);
                    if (data.msg == "_timeout") {
                        window.location.href = "../UserLogin/Login.html";
                    }
                    else {
                        if (data.TB_MEMBER == true) {
                            $("#TB_USERNAME").text(data.TB_USERNAME + "[会员]");
                        }
                        else {
                            $("#TB_USERNAME").text(data.TB_USERNAME);
                        }
                        $("#TB_PHONE").text(data.TB_NUMBER);
                        $(".bzj_price").text(data.TB_BZJ_PRICE.toFixed(2));
                        number = data.TB_NUMBER.replace(" ", "");
                        phone = data.TB_PHONE;
                    }
                }
            }
        });
        $.ajax({
            type: "post",
            url: "../../BaseRefWeb.aspx?stype=ISpMemberFun&method=GetZfYuE&type=sp",
            success: function (result) {
                $(".yj_price").text(result);
            }
        });
    })
    $(document).ready(function () {
        $('.container').on('click', '.nav-item', function () {
            const $this = $(this)
            const index = $this.index()
            $this.addClass('active').siblings().removeClass('active')
            switch (index) {
                case 0:
                    location.href = '../../rushBuy.html';
                    break
                case 1:
                    location.href = '../shop/order.html';
                    break
                case 2:
                    location.href = 'personalCenter.html';
                    break
            }
        })
        // 二维码
        $(".invitation").click(function () {
            $("#qrcode").html("");
            $('#qrcode').qrcode({
                render: "canvas", //也可以替换为table
                width: 150,
                height: 150,
                text: "http://www.bairuihuayuan.com/Manage/UserLogin/regis.html?number=" + number + ""
            });
            $(".cover").toggle()
            $(".bigInvitationBox").toggle()
        })
        $(".confirm").click(function () {
            $(".cover").toggle()
            $(".bigInvitationBox").toggle()
        })
        // 跳转到佣金榜
        $(".commission").click(function () {
            location.href = 'commissionTop.html';
        })
        // 跳转到推广榜
        $(".extension").click(function () {
            location.href = 'extension.html';
        })
        // 跳转到当前佣金
        $("#myyongjin").click(function () {
            location.href = 'mycommission.html';
        })
        // 跳转到我的保证金
        $("#mybaozhengjin").click(function () {
            location.href = 'mybond.html';
        })
        // 支付认证
        $(".zfbEmpower").click(function () {
            location.href = 'zfbEmpower.html';
        })
        // 地址管理
        $(".address").click(function () {
            location.href = 'address.html';
        })
        // 实名认证
        $(".authentication").click(function () {
            location.href = 'authentication.html';
        })
        // 我的好友
        $(".myFriends").click(function () {
            location.href = 'myFriends.html';
        })
        // 分销订单
        $(".distributionOrder").click(function () {
            location.href = 'distributionOrder.html';
        })
        // 帮助中心
        $(".helpCenter").click(function () {
            location.href = 'helpCenter.html';
        })
        //修改密码
        $(".changePassword").click(function () {
            location.href = '../UserLogin/Revise.html';
        })
        //关闭手机号
        $("#eyeopen").click(function () {
            $("#TB_PHONE").text("xxxxxxxxxxx");
            $("#eyecloseopen").show();
            $("#eyeopen").hide();
        })
        $("#eyecloseopen").click(function () {
            $("#TB_PHONE").text(number);
            $("#eyecloseopen").hide();
            $("#eyeopen").show();
        })
    });
    function clearNoNum(obj) {
        obj.value = obj.value.replace(/[^\d.]/g, "");  //清除“数字”和“.”以外的字符
        obj.value = obj.value.replace(/\.{2,}/g, "."); //只保留第一个. 清除多余的
        obj.value = obj.value.replace(".", "$#$").replace(/\./g, "").replace("$#$", ".");
        obj.value = obj.value.replace(/^(\-)*(\d+)\.(\d\d).*$/, '$1$2.$3');//只能输入两个小数
        if (obj.value.indexOf(".") < 0 && obj.value != "") {//以上已经过滤，此处控制的是如果没有小数点，首位不能为类似于 01、02的金额
            obj.value = parseFloat(obj.value);
        }
    }
</script>
</html>
